
<div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">Invoice Information</h3>
    </div>
    <div class="panel-body">
        <?php echo $this->Form->create('Invoice'); ?>
        <div class="table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th>No. Invoice</th>
                  <th>Invoice Level</th>
                  <th>Ship Ref</th>
                </tr>
              </thead>
              <tbody>
                <?php
                    for($i = 1 ; $i < $counter ; $i++)
                    {
                ?>
                <tr>
                    <td><?php echo $invoicelabel[$i]; echo $this->Form->input('InvoiceNo_' . $i, array('type' => 'hidden')); ?></td>
                    <td><?php echo $this->Form->input('InvoiceLevel_' . $i, array('label' => '')); ?></td>
                    <td><?php echo $this->Form->input('ShipRef_' . $i, array('label' => '')); ?></td>
                </tr>
                <?php
                    }
                ?>
              </tbody>
            </table>
          </div>
    </div>
    <div class="panel-heading">
      <h3 class="panel-title">Silahkan Lengkapi data berikut:</h3>
    </div>
    <div class="panel-body">
        <div class="table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th>Seri</th>
                  <th>Uraian Barang</th>
                  <th>Quantity</th>
                  <th>No. Invoice</th>
                  <th>Product Line</th>
                  <th>External Product ID</th>
                </tr>
              </thead>
              <tbody>
                <?php
                    for($j = 1 ; $j < $counterdtl ; $j++)
                    {
                ?>
                <tr>
                    <td><?php echo $detaillabel[$j]['Serial']; echo $this->Form->input('Serial_' . $j, array('type' => 'hidden')); ?></td>
                    <td><?php echo $detaillabel[$j]['BrgUrai']; echo $this->Form->input('BrgUrai_' . $j, array('type' => 'hidden')); ?></td>
                    <td><?php echo $detaillabel[$j]['JmlSat']; echo $this->Form->input('JmlSat_' . $j, array('type' => 'hidden')); ?></td>
                    <td><?php echo $this->Form->select('InvoiceNoLink_' . $j, $invoicelist); ?></td>
                    <td><?php echo $this->Form->input('ProductLine_' . $j, array('label' => '')); ?></td>
                    <td><?php echo $this->Form->input('ExternalID_' . $j, array('label' => '')); ?></td>
                </tr>
                <?php
                    }
                ?>
              </tbody>
            </table>
          </div>
    <?php
        echo $this->Form->input('counter', array('type' => 'hidden', 'value' => $counter));
        echo $this->Form->input('counterdtl', array('type' => 'hidden', 'value' => $counterdtl));
        echo $this->Form->end('Save');
    ?>
    </div>
    <div><?php //print_r($check2); ?></div>
</div>   